import request from '@/utils/request'

const gameDataApi = {

  // sjtj https://lb.bihuo8.com/api/qw/gameTaskData/updateShowRankList
  getData: '/qw/gameTaskData/gameData',
  updateShowRankList: '/qw/gameTaskData/updateShowRankList',
  userPage: '/qw/gameTaskData/userPage',
  export: '/qw/gameTaskData/export',
  gameChannelData: '/qw/gameTaskData/gameChannelData',
  allData: '/qw/gameTaskData/allData',
  searchAll: '/qw/gameTask/searchAll',
  mySharePage: '/qw/gameTaskData/mySharePage'

  // getUrl: '/file/getUrl'
}

export function mySharePage (parameter) {
  return request({
    url: gameDataApi.mySharePage,
    method: 'get',
    params: parameter
  })
}

export function searchAll (parameter) {
  return request({
    url: gameDataApi.searchAll,
    method: 'get',
    params: parameter
  })
}

export function getData (parameter) {
  return request({
    url: gameDataApi.getData,
    method: 'get',
    params: parameter
  })
}

export function allData (parameter) {
  return request({
    url: gameDataApi.allData,
    method: 'get',
    params: parameter
  })
}

export function updateShowRankList (parameter) {
  return request({
    url: gameDataApi.updateShowRankList,
    method: 'get',
    params: parameter
  })
}

export function userPage (parameter) {
  return request({
    url: gameDataApi.userPage,
    method: 'get',
    params: parameter
  })
}

export function exportData (parameter) {
  return request({
    url: gameDataApi.export,
    method: 'get',
    params: parameter
  })
}

export function gameChannelData (parameter) {
  return request({
    url: gameDataApi.gameChannelData,
    method: 'get',
    params: parameter
  })
}

export function copyGame (parameter) {
  return request({
    url: gameDataApi.copyGame,
    method: 'get',
    params: parameter
  })
}

export function getById (parameter) {
  return request({
    url: gameDataApi.getById,
    method: 'get',
    params: parameter
  })
}

export function saveGame (parameter) {
  return request({
    url: gameDataApi.saveGame,
    method: 'POST',
    data: parameter
  })
}

export default {
  getData,
  updateShowRankList,
  exportData,
  userPage,
  saveGame,
  getById,
  gameChannelData,
  allData,
  searchAll,
  mySharePage

}
